import $http from "./request";

export const BASE_URL = "/clpo";

export const WS_URL = "ws://localhost:8001/" + BASE_URL + "/ws";

export function httpPost(url, params) {
  if (!params) {
    params = {};
  }
  return $http.fetchPost({ url: url, data: params });
}

export function httpGet(url, params) {
  if (!params) {
    params = "";
  }
  return $http.fetchGet({ url: url + params });
}

//系统模块
//登录
export const OA_LOGIN = BASE_URL + "/oa/login";
//登出
export const OA_LOGOUT = BASE_URL + "/oa/logout";
//获取菜单
export const SYS_GET_MENUS = BASE_URL + "/sys/getMenus";
// 获取用户信息
export const SYS_GET_USER_INFO = BASE_URL + "/sys/getUserInfo";
// 获取车辆信息
export const SYS_GET_CAR_INFO = BASE_URL + "/sys/getCarInfo";
// 获取用户车辆信息
export const SYS_GET_USER_CAR_INFO = BASE_URL + "/sys/getUserCarInfo"
//权限校验
export const PERMISSION_CHECK = BASE_URL + "/sys/permissionCheck";
//获取下拉框数据
export const GET_SELECT_DATA = BASE_URL + "/sys/getSelectData";

//消息通知
export const GET_NOTIFICATION_INFO = BASE_URL + "/notify/get-notification-info";
//消费消息
export const CONSUMER_NOTIFICATION = BASE_URL + "/notify/consume-notification";

export const RECORD_CLUSTER_INFO = BASE_URL + "/env/list-env";

//注册loading使用
export const URLS = {
  OA_LOGIN,
  OA_LOGOUT,
  SYS_GET_MENUS,
  PERMISSION_CHECK,
  GET_SELECT_DATA,
  GET_NOTIFICATION_INFO,
  CONSUMER_NOTIFICATION,
  RECORD_CLUSTER_INFO,
  SYS_GET_USER_INFO
};



